% exercise 12

global LensParms; % phsyical parameters
LensParms.h = 1; LensParms.b = 20; LensParms.R = 7; LensParms.eps = 1.5;
LensParms.x_init = 3;
global Weighting;
Weighting = .9;


[y, sigma_dyn, fitness_dyn, generations] = slash_comma_sa_es_intermediate(3, 3, 10, 15, 'f_ges', 1, 10^-5);
[sigma_dyn1, fitness_dyn1, generations1] = CMSA;
% print the result
clf();

hold on;
semilogy(generations, fitness_dyn, '1');
semilogy(generations1, fitness_dyn1, '2');
legend("MU/MU-i,Lambda-ES", "CMSA");
legend('boxon');
legend('Location', 'northeast');
xlabel("Generations");
ylabel("Fitness");
hold off;